<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta name="format-detection" content="telephone=no" />
    <title>充值和提现账单</title>
    <link rel="stylesheet" href="../../css/reset.css" />
    <style>
        body {
            width: 100%;
            background-color: #fff;
            font-size: 0.28rem;
            height: auto;
            -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
            font-family: Helvetica;
            color: #333333;
            -webkit-overflow-scrolling: touch;
        }

        .showListAll {
            padding: 0 0 0 0.24rem;
        }

        .recored {
            box-sizing: border-box;
            padding-left: 0.24rem;
        }

        .showListAll ul {
            margin: auto;
        }

        .recored li {
            height: 1.6rem;
            background-color: #fff;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            -webkit-flex-direction: column;
            justify-content: space-between;
            -webkit-justify-content: space-between;
            border-bottom: 0.01rem solid #e2e2e2;
        }

        .recored li:first-of-type {
            margin-top: 0;
        }

        .textype {
            background-color: #fabf38;
            margin-right: 0.14rem;
            color: #fff;
            width: 0.36rem;
            height: 0.36rem;
            font-size: 0.24rem;
            line-height: 0.36rem;
            text-align: center;
        }

        .textRe {
            height: 1rem;
            padding: 0 0.24rem;
            display: flex;
            display: -webkit-flex;
            justify-content: space-between;
            -webkit-justify-content: space-between;
            align-items: center;
            -webkit-align-items: center;
        }

        .textRe p {
            width: 50%;
            height: 1rem;
            display: flex;
            display: -webkit-flex;
            justify-content: center;
            -webkit-justify-content: center;
        }

        .textRe p:first-of-type span {
            display: inline-block;
            width: 1.67rem;
            font-size: 0.26rem;
            height: 0.94rem;
            display: flex;
            display: -webkit-flex;
            justify-content: center;
            -webkit-justify-content: center;
            align-items: center;
            -webkit-align-items: center;
            border-bottom: 0.06rem solid #ffd203;
        }

        .textRe p:last-of-type span {
            display: inline-block;
            width: 1.67rem;
            font-size: 0.26rem;
            height: 0.94rem;
            display: flex;
            display: -webkit-flex;
            justify-content: center;
            -webkit-justify-content: center;
            align-items: center;
            -webkit-align-items: center;
            border-bottom: 0.06rem solid #fff;
        }

        .list-item {
            /* height: 0.8rem; */
            display: flex;
            display: -webkit-flex;
            padding-right: 0.24rem;
            justify-content: space-between;
            -webkit-justify-content: space-between;
            align-items: center;
            -webkit-align-items: center;
        }

        .condition {
            display: flex;
            display: -webkit-flex;
            align-items: center;
            -webkit-align-items: center;
        }

        .coin-list-detail {
            color: #181818;
            font-weight: 500;
        }

        .coin-list-detail-item {
            color: #999999;
        }

        .list-addres {
            margin-top: 0.2rem;
            display: flex;
            display: -webkit-flex;
            padding-right: 0.24rem;
            color: #adadad;
            font-size: 0.24rem;
            justify-content: space-between;
            -webkit-justify-content: space-between;
            align-items: center;
            -webkit-align-items: center;
        }

        #btn-box {
            width: 100%;
            box-sizing: border-box;
            background-color: #fff;
            padding: 0 0.24rem;
            height: 1.2rem;
            position: fixed;
            bottom: 0;
            left: 0;
            display: flex;
            display: -webkit-flex;
            justify-content: center;
            -webkit-justify-content: center;
            align-items: center;
            -webkit-align-items: center;
            box-shadow: #e2e2e2;
        }

        .coinTime {
            font-weight: 0.28rem;
            color: #181818;
            font-weight: 500;
        }

        #btn-box ul {
            width: 100%;
            display: flex;
            display: -webkit-flex;
            justify-content: space-between;
            -webkit-justify-content: space-between;
            align-items: center;
            -webkit-align-items: center;
        }

        #btn-box ul li {
            width: 3.35rem;
            height: 0.85rem;
            color: #181818;
            font-size: 0.3rem;
            display: flex;
            display: -webkit-flex;
            justify-content: center;
            -webkit-justify-content: center;
            align-items: center;
            -webkit-align-items: center;
            background-color: #ffd203;
        }

        #coinType {
            border: none;
            outline: none;
            background-color: #f8f8f8;
            font-size: 0.28rem;
        }

        .list-detail {
            height: 1.9rem;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            -webkit-flex-direction: column;
            color: #999999;
        }

        .list-img {
            flex: 1;
            display: flex;
            display: -webkit-flex;
            justify-content: space-between;
            -webkit-justify-content: space-between;
            align-items: center;
            -webkit-align-items: center;
            border-top: 0.01rem solid #e5e5e5;
        }

        .list-img img {
            width: 0.6rem;
            height: 0.56rem;
            margin-right: 0.22rem;
        }

        .times {
            height: 0.5rem;
            line-height: 0.5rem;
        }

        .deal-detail {
            flex: 1;
        }

        .deal-detail p:first-of-type {
            display: flex;
            display: -webkit-flex;
            justify-content: space-between;
            -webkit-justify-content: space-between;
        }

        .deal-detail p {
            color: #999999;
        }

        .style_yes {
            color: #7dc371;
        }

        .style_yes2 {
            color: #ff8e3c;
        }

        .style_yes3 {
            color: #ddd;
        }

        ul>li {
            box-sizing: border-box;
            padding-right: 0.24rem;
        }

        .showlist {
            margin-top: 0.16rem;
            background-color: #fff;
        }

        .listtitle {
            width: 100%;
            border-bottom: 1px solid #d9d9d9;
        }

        #showcoinList {
            width: 100%;
            height: auto;
            display: flex;
            display: -webkit-flex;
            justify-content: space-around;
        }

        #showcoinList li {
            padding: 0 0.1rem;
            height: 0.9rem;
            border-bottom: 1px solid #fff;
            line-height: 0.9rem;
        }

        #showcoinList li:first-of-type {
            border-bottom: 1px solid #fad203;
        }

        .listdetail {
            width: 100%;
            height: auto;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
        }

        .listdetail li {
            width: 100%;
            box-sizing: border-box;
            height: 2.4rem;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            padding: 0 0.3rem;
            border-bottom: 1px solid #d9d9d9;
        }

        .backchoose {
            height: 0.82rem;
            display: flex;
            display: -webkit-flex;
            justify-content: space-between;
            align-items: center;
        }

        .priceDetail {
            box-sizing: border-box;
            width: 100%;
            display: flex;
            display: -webkit-flex;
            font-size: 0.24rem;
            justify-content: space-between;
            color: #cac5b8;
        }

        .priceDetail div p:not(first-of-type) {
            margin: 0.13rem 0;
        }
    </style>
</head>

<body>
    <div id="showAboutRecharege"
        style="width: 100%;background-color: #fff;display: flex;display: -webkit-flex;border-bottom: 1px solid #e5e5e5;height: 0.82rem;align-items:center;font-size: 0.26rem;position: fixed;top: 0;left: 0;z-index:100;display: none;">
        <span data-choose="myRechareBlance"
            style="width: 50%;display: inline-block;border-right: 1px solid #e5e5e5;color: #ffd203;height: 0.4rem;line-height: 0.4rem;text-align: center;">
            余额充值
        </span>
        <span data-choose="myRechareOtc"
            style="width: 50%;color: #333333;display: inline-block;height: 0.4rem;line-height: 0.4rem;text-align: center;">
            OTC充值
        </span>
    </div>
    <div id="showAboutGetCash"
        style="width: 100%;background-color: #fff;display: flex;display: -webkit-flex;border-bottom: 1px solid #e5e5e5;height: 0.82rem;align-items:center;font-size: 0.26rem;position: fixed;top: 0;left: 0;z-index:100;display: none;">
        <span data-choose="myGetCashBlance"
            style="width: 50%;display: inline-block;border-right: 1px solid #e5e5e5;color: #ffd203;height: 0.4rem;line-height: 0.4rem;text-align: center;">
            余额提现
        </span>
        <span data-choose="myGetCashBcny"
            style="width: 50%;color: #333333;display: inline-block;height: 0.4rem;line-height: 0.4rem;text-align: center;">
            余额OTC提现
        </span>
    </div>
    <div id="showOutcoinList"
        style="width: 100%;background-color: #fff;display: flex;display: -webkit-flex;border-bottom: 1px solid #e5e5e5;height: 0.82rem;align-items:center;font-size: 0.26rem;position: fixed;top: 0;left: 0;z-index:100;display: none;">
        <span data-choose="otherPayList"
            style="width: 50%;display: inline-block;border-right: 1px solid #e5e5e5;color: #ffd203;height: 0.4rem;line-height: 0.4rem;text-align: center;">
            其他钱包
        </span>
        <span data-choose="BHPayList"
            style="width: 50%;color: #333333;display: inline-block;height: 0.4rem;line-height: 0.4rem;text-align: center;">
            BHPay钱包
        </span>
    </div>
    <div id="showAboutMe"
        style="width: 100%;background-color: #fff;display: flex;display: -webkit-flex;border-bottom: 1px solid #e5e5e5;height: 0.82rem;align-items:center;font-size: 0.26rem;position: fixed;top: 0;left: 0;z-index:100;display: none;">
        <span data-choose="myReceiveRed"
            style="width: 50%;display: inline-block;border-right: 1px solid #e5e5e5;color: #ffd203;height: 0.4rem;line-height: 0.4rem;text-align: center;">
            已收到
        </span>
        <span data-choose="mySendRed"
            style="width: 50%;color: #333333;display: inline-block;height: 0.4rem;line-height: 0.4rem;text-align: center;">
            已发出
        </span>
    </div>
    <div id="showExchangeCoin"
        style="width: 100%;background-color: #fff;display: flex;display: -webkit-flex;border-bottom: 1px solid #e5e5e5;height: 0.82rem;align-items:center;font-size: 0.26rem;position: fixed;top: 0;left: 0;z-index:100;display: none;">
        <span data-choose="sell"
            style="width: 50%;display: inline-block;border-right: 1px solid #e5e5e5;color: #ffd203;height: 0.4rem;line-height: 0.4rem;text-align: center;">
            委托代售
        </span>
        <span data-choose="buy"
            style="width: 50%;color: #333333;display: inline-block;height: 0.4rem;line-height: 0.4rem;text-align: center;">
            委托代购
        </span>
    </div>
    <!-- 充币 -->
    <div id="walletPayBag"
        style="width: 100%;background-color: #fff;display: flex;display: -webkit-flex;border-bottom: 1px solid #e5e5e5;height: 0.82rem;align-items:center;font-size: 0.26rem;position: fixed;top: 0;left: 0;z-index:100;display: none;">
        <span data-choose="otherwalletPay"
            style="width: 50%;display: inline-block;border-right: 1px solid #e5e5e5;color: #ffd203;height: 0.4rem;line-height: 0.4rem;text-align: center;">
            其他钱包
        </span>
        <span data-choose="bhpayWalletPay"
            style="width: 50%;color: #333333;display: inline-block;height: 0.4rem;line-height: 0.4rem;text-align: center;">
            BHPay钱包
        </span>
    </div>
    <div class="showListAll">
        <ul class="showList" id="ul_list" style="box-sizing: border-box;width: 100%;">

        </ul>
        <div id="listState" style="text-align: center;margin: auto;color: #666666;margin-top: 0.2rem;"></div>
    </div>
    <script src="../../script/autosize.js"></script>
    <script src="../../script/fastclick.js"></script>
    <script src="../../script/jquery_three_two_one.js"></script>
    <script src="../../script/dotmin.js"></script>
    <script src="../../script/app.js"></script>
    <script>
        apiready = function () {
            var app = new APP();
            app.log("get_cash_detail", "提现详情页面");
            var account = app.getAccount();
            var getforePageData = api.pageParam.isShowOtcProperty;
            if (getforePageData == "true") {
                $("#showAboutRecharege").css("display", "flex");
                $("#showAboutRecharege").css("display", "-webkit-flex");
                $(".showListAll").css({
                    marginTop: "1rem"
                })
            }
            var choose = "rechage";
            var showfirst = "myReceiveRed"; //选择红包的记录
            var rechageType = "myRechareBlance"; //选择充值的记录
            var getCashList = "myGetCashBlance"; //默认提现记录
            var getOutcoinlist = "otherPayList"; //默认选择其他提币方式
            var agentSellChoose = "sell"; //默认委托交易
            var rechargeCoin = "otherwalletPay";//充币默认选择其他钱包
            var lastGetReTime = ""; //接收红包最后一条数据的时间
            var lastGetSeTime = ""; //发送红包最后一条数据的时间
            var reTwo = /([0-9]+\.[0-9]{2})[0-9]*/;
            var refour = /([0-9]+\.[0-9]{4})[0-9]*/;
            var reEight = /([0-9]+\.[0-9]{8})[0-9]*/;
            // 当前加载页面
            var curPage = 1;
            var totalPage = 0;
            //请求提现数据
            function loadPage(page, isdown) {
                app.ajax({
                    param: {
                        method: "post",
                        url: app.ajaxUrl + "finance/withdraw-record-lists",
                        data: {
                            values: {
                                currency_name: 'CNY',
                                token: account.token,
                                page: page
                            }
                        },
                        callback: function (ret, err) {
                            console.log(JSON.stringify(ret));
                            app.stopRefresh();
                            if (ret.code == 200) {
                                totalPage = ret.data.lists.total_page || 1;
                                var list = ret.data.lists || [];
                                list.map(function (item) {
                                    item.currency_code = item.currency_code.toUpperCase();
                                });
                                // 渲染模板
                                var temp = doT.template($("#listT").text());
                                if (isdown) {
                                    $("#ul_list").html(temp(list));
                                } else {
                                    $("#ul_list").append(temp(list));
                                }
                                if (curPage == 1 && list.length == 0) {
                                    $("#listState").text("暂时没有相关数据");
                                }
                            }
                        }
                    },
                    extra: {
                        container: "#ul_list",
                        isflower: true
                    }
                });
            }
            //请求BCNY=OTC提现记录
            function loadPageBcny(page, isdown) {
                app.ajax({
                    param: {
                        method: "post",
                        url: app.ajaxUrl + "finance/withdraw-record-lists",
                        data: {
                            values: {
                                currency_name: 'BCNY',
                                token: account.token,
                                page: page
                            }
                        },
                        callback: function (ret, err) {
                            console.log("BCNY提现返回：" + JSON.stringify(ret));
                            app.stopRefresh();
                            if (ret.code == 200) {
                                totalPage = ret.data.lists.total_page || 1;
                                var list = ret.data.lists || [];
                                // 渲染模板
                                var temp = doT.template($("#listgetCashBcny").text());
                                if (isdown) {
                                    $("#ul_list").html(temp(list));
                                } else {
                                    $("#ul_list").append(temp(list));
                                }
                                if (curPage == 1 && list.length == 0) {
                                    $("#listState").text("暂时没有相关数据");
                                }
                                if (curPage < totalPage) {
                                    $("#listState").text("加载更多");
                                }
                                if (curPage >= totalPage) {
                                    $("#listState").text("没有更多数据了");
                                }
                            }
                        }
                    },
                    extra: {
                        container: "#ul_list",
                        isflower: true
                    }
                });
            }
            //请求充值记录
            function loadPageT(page, isdown) {
                app.ajax({
                    param: {
                        method: "post",
                        url: app.ajaxUrl + "finance/charge-lists",
                        data: {
                            values: {
                                token: account.token,
                                page: page
                            }
                        },
                        callback: function (ret, err) {
                            app.stopRefresh();
                            if (ret.code == 200) {
                                totalPage = ret.data.total_page;
                                // 处理数据
                                var lists = ret.data.lists;
                                for (var i = 0; i < lists.length; i++) {
                                    var item = JSON.stringify(lists[i]);
                                    lists[i].item = item;
                                }
                                // 渲染模板
                                var temp = doT.template($("#list").text());
                                if (isdown) {
                                    $("#ul_list").html(temp(lists));
                                } else {
                                    $("#ul_list").append(temp(lists));
                                }
                                // 判断是不是第一页且没有数据的特殊情况
                                if (lists.length == 0 && curPage == 1) {
                                    $("#listState").text("暂时没有相关数据");
                                }
                                if (curPage == totalPage && totalPage != 0) {
                                    $("#listState").text("已经到底了");
                                }
                            }
                        }
                    },
                    extra: {
                        container: "#ul_list",
                        isflower: true
                    }
                });
            }
            loadPageT(curPage, true);
            //请求OTC充值记录
            function getOtcRechageList(page, isdown) {
                app.ajax({
                    param: {
                        method: "post",
                        url: app.ajaxUrl + "otc/lists",
                        data: {
                            values: {
                                token: account.token,
                                page: page,
                                pageSzie: "20"
                            }
                        },
                        callback: function (ret, err) {
                            app.stopRefresh();
                            if (ret.code == 200) {
                                totalPage = ret.data.totalPage;
                                // 渲染模板
                                var temp = doT.template($("#rechageOtclist").text());
                                var list = ret.data.lists;
                                if (isdown) {
                                    $("#ul_list").html(temp(list));
                                } else {
                                    $("#ul_list").append(temp(list));
                                }
                                // 判断是不是第一页且没有数据的特殊情况
                                if (list.length == 0 && curPage == 1) {
                                    $("#listState").text("暂时没有相关数据");
                                }
                                if (curPage == totalPage && totalPage != 0) {
                                    $("#listState").text("已经到底了");
                                }
                            }
                        }
                    },
                    extra: {
                        container: "#ul_list",
                        isflower: true
                    }
                });
            }
            // 提币记录
            function loadPageOther(page, isdown) {
                app.ajax({
                    param: {
                        method: "post",
                        url: app.ajaxUrl + "finance/withdraw-coin-lists",
                        data: {
                            values: {
                                token: account.token,
                                page: page
                            }
                        },
                        callback: function (ret, err) {
                            console.log("rentList返回：" + JSON.stringify(ret));
                            app.stopRefresh();
                            if (ret.code == 200) {
                                totalPage = ret.data.lists.total_page;
                                var list = ret.data.lists.withdrawcoin;
                                list.map(function (item) {
                                    if (item.coin_type == "BHP" || item.coin_type == "USDT" || item.coin_type == "BHPC") {
                                        item.coin_num = app.sliceNum(item.coin_num, 4);
                                    } else {
                                        item.coin_num = app.sliceNum(item.coin_num, 8);
                                    }
                                });
                                // 渲染模板
                                var temp = doT.template($("#outcoinlist").text());
                                app.log("list", temp(list));
                                if (isdown) {
                                    $("#ul_list").html(temp(list));
                                } else {
                                    $("#ul_list").append(temp(list));
                                }
                                // 渲染模板
                                if (curPage == 1 && list.length == 0) {
                                    $("#listState").text("暂时没有相关数据");
                                }
                                if (curPage == totalPage && curPage != 0) {
                                    $("#listState").text("已经到底了");
                                }
                            }
                        }
                    },
                    extra: {
                        container: "#ul_list",
                        isflower: true
                    }
                });
            }
            //bhpay提币记录
            function bhpayList(page, isdown) {
                app.ajax({
                    param: {
                        method: "post",
                        url: app.ajaxUrl + "bhpay/get",
                        data: {
                            values: {
                                token: account.token,
                                page: page
                            }
                        },
                        callback: function (ret, err) {
                            // console.log("bhpayList返回：" + JSON.stringify(ret));
                            app.stopRefresh();
                            if (ret.code == 200) {
                                totalPage = ret.data.total_page;
                                var list = ret.data.lists;
                                list.map(function (item) {
                                    if (item.currency_name == "BHP" || item.currency_name == "USDT") {
                                        item.num = app.sliceNum(item.num, 4);
                                    } else {
                                        item.num = app.sliceNum(item.num, 8);
                                    }
                                });
                                // 渲染模板
                                var temp = doT.template($("#bhpayOutList").text());
                                app.log("list", temp(list));
                                if (isdown) {
                                    $("#ul_list").html(temp(list));
                                } else {
                                    $("#ul_list").append(temp(list));
                                }
                                // 渲染模板
                                if (curPage == 1 && list.length == 0) {
                                    $("#listState").text("暂时没有相关数据");
                                }
                                if (list.length > 0 && totalPage > 1) {
                                    $("#listState").text("加载更多");
                                }
                                if (list.length > 0 && totalPage == 1) {
                                    $("#listState").text("没有更多数据了");
                                }
                            } else {
                                app.toast(ret.message);
                            }
                        }
                    },
                    extra: {
                        container: "#ul_list",
                        isflower: true
                    }
                });
            }
            //糖果兑换记录
            function exchangeBhpcSweet(page, isdown) {
                app.ajax({
                    param: {
                        method: "post",
                        url: app.ajaxUrl + "finance/sweet-exchange-lists",
                        data: {
                            values: {
                                token: account.token,
                                page: page
                            }
                        },
                        callback: function (ret, err) {
                            console.log("bhpcsweet返回：" + JSON.stringify(ret));
                            app.stopRefresh();
                            if (ret.code == 200) {
                                totalPage = ret.data.total_page;
                                var list = ret.data.list;
                                // 渲染模板
                                var temp = doT.template($("#bhpcsweet").text());
                                if (isdown) {
                                    $("#ul_list").html(temp(list));
                                } else {
                                    $("#ul_list").append(temp(list));
                                }
                                if (curPage == 1 && list.length == 0) {
                                    $("#listState").text("暂时没有相关数据");
                                }
                            }
                        }
                    },
                    extra: {
                        container: "#ul_list",
                        isflower: true
                    }
                });
            }
            //充币(其他钱包)
            function rechageCoin(page, isdown) {
                app.ajax({
                    param: {
                        method: "post",
                        url: app.ajaxUrl + "finance/recharge-other-lists",
                        data: {
                            values: {
                                token: account.token,
                                page: page,
                            }
                        },
                        callback: function (ret, err) {
                            app.stopRefresh();
                            if (ret.code == 200) {
                                totalPage = ret.data.total_page;
                                // 渲染模板
                                var list = ret.data.list;
                                var temp = doT.template($("#rechageCoin").text());
                                list.map(function (item) {
                                    if (item.currency_name == "BHP" || item.currency_name == "USDT" || item.currency_name == "BHPC") {
                                        item.num = app.sliceNum(item.num, 4);
                                    } else {
                                        item.num = app.sliceNum(item.num, 8);
                                    }
                                })
                                if (isdown) {
                                    $("#ul_list").html(temp(list));
                                } else {
                                    $("#ul_list").append(temp(list));
                                }
                                if (curPage == 1 && list.length == 0) {
                                    $("#listState").text("暂时没有相关数据");
                                }
                            }
                        }
                    },
                    extra: {
                        container: "#ul_list",
                        isflower: true
                    }
                });
            }
            //充币(Bhpay钱包)
            function rechageCoinBhpay(page, isdown) {
                app.ajax({
                    param: {
                        method: "post",
                        url: app.ajaxUrl + "bhpay/recharge",
                        data: {
                            values: {
                                token: account.token,
                                page: page
                            }
                        },
                        callback: function (ret, err) {
                            console.log("bhpcrecharge返回：" + JSON.stringify(ret));
                            app.stopRefresh();
                            if (ret.code == 200) {
                                totalPage = ret.data.total_page;
                                var list = ret.data.lists;
                                // 渲染模板
                                var temp = doT.template($("#rechageCoinBhpay").text());
                                if (isdown) {
                                    $("#ul_list").html(temp(list));
                                } else {
                                    $("#ul_list").append(temp(list));
                                }
                                if (curPage == 1 && list.length == 0) {
                                    $("#listState").text("暂时没有相关数据");
                                }
                                if (list.length > 0 && totalPage > 1) {
                                    $("#listState").text("加载更多");
                                }
                                if (list.length > 0 && totalPage == 1) {
                                    $("#listState").text("没有更多数据了");
                                }
                            }
                        }
                    },
                    extra: {
                        container: "#ul_list",
                        isflower: true
                    }
                });
            }
            //收红包记录
            function redBagList(GetReTime, isdown) {
                var data = {
                    token: account.token,
                    since: GetReTime,
                    type: "receive",
                    limit: "20"
                }
                app.ajax({
                    param: {
                        method: "post",
                        url: app.ajaxUrl + "hongbao/history",
                        closeTips: true,
                        data: {
                            values: {
                                token: account.token,
                                since: GetReTime,
                                type: "receive",
                                limit: "20"
                            }
                        },
                        callback: function (ret, err) {
                            console.log("收红包返回：" + JSON.stringify(ret));
                            app.stopRefresh();
                            if (ret.code == 200) {
                                totalPage = ret.data.total_page;
                                var list = ret.data.lists;
                                list.map(function (item) {
                                    if (item.currency == "BTC" || item.currency == "LTC" || item.currency == "ETH") {
                                        item.amount = app.sliceNum(item.amount, 8);
                                    } else if (item.currency == "BHP" || item.currency == "BHPC") {
                                        item.amount = app.sliceNum(item.amount, 4);
                                    } else {
                                        item.amount = app.sliceNum(item.amount, 2);
                                    }
                                });
                                var dataLength = list.length;
                                if (dataLength > 0) {
                                    lastGetReTime = Date.parse(list[list.length - 1].opened_at) || '';
                                }
                                // 渲染模板
                                var temp = doT.template($("#redBagListRe").text());
                                if (isdown) {
                                    $("#ul_list").html(temp(list));
                                } else {
                                    $("#ul_list").append(temp(list));
                                }
                                if (list.length == 0) {
                                    $("#listState").text("暂时没有相关数据");
                                }
                            }
                            if (curPage == totalPage && curPage != 0) {
                                $("#listState").text("已经到底了");
                            }
                        }
                    },
                    extra: {
                        container: "#ul_list",
                        isflower: true
                    }
                });
            }
            //发红包记录
            function sendRedBagList(pagetime, isdown) {
                app.ajax({
                    param: {
                        method: "post",
                        url: app.ajaxUrl + "hongbao/history",
                        closeTips: true,
                        data: {
                            values: {
                                token: account.token,
                                since: pagetime,
                                type: "send",
                                limit: "20"
                            }
                        },
                        callback: function (ret, err) {
                            app.log("红包记录", "limit返回：" + JSON.stringify(ret));
                            app.stopRefresh();
                            if (ret.code == 200) {
                                totalPage = ret.data.total_page;
                                var list = ret.data.lists;
                                list.map(function (item) {
                                    if (item.currency == "BTC" || item.currency == "LTC" || item.currency == "ETH") {
                                        item.amount = app.sliceNum(item.amount, 8);
                                    } else if (item.currency == "BHP" || item.currency == "BHPC") {
                                        item.amount = app.sliceNum(item.amount, 4);
                                    } else {
                                        item.amount = app.sliceNum(item.amount, 2);
                                    }
                                })
                                var dataSetime = list.length;
                                if (dataSetime > 0) {
                                    lastGetReTime = Date.parse(list[list.length - 1].opened_at) || '';
                                }
                                // 渲染模板
                                var temp = doT.template($("#sendRedBagList").text());
                                if (isdown) {
                                    $("#ul_list").html(temp(list));
                                } else {
                                    $("#ul_list").append(temp(list));
                                }
                                if (list.length == 0) {
                                    $("#listState").text("暂时没有相关数据");
                                }
                            }
                            if (curPage == totalPage && curPage != 0) {
                                $("#listState").text("已经到底了");
                            }
                        }
                    },
                    extra: {
                        container: "#ul_list",
                        isflower: true
                    }
                });
            }
            //个人转账记录
            function transferCoin(page, isdown) {
                app.ajax({
                    param: {
                        method: "post",
                        url: app.ajaxUrl + "finance/personal-transfer",
                        data: {
                            values: {
                                token: account.token,
                                page: page
                            }
                        },
                        callback: function (ret, err) {
                            app.stopRefresh();
                            if (ret.code == 200) {
                                totalPage = ret.data.total_page;
                                var list = ret.data.list;
                                list.map(function (item) {
                                    item.tel = item.status === 'in' ? item.in_tel : item.out_tel;//对方账号
                                    item.addtime = app.getDate(item.create_time, false);
                                    item.name = item.type.toUpperCase();
                                    if (item.type == "bhp") {
                                        item.num = app.sliceNum(item.num, 4);
                                    } else if (item.type == "money") {
                                        item.num = app.sliceNum(item.num, 2);
                                        item.name = "CNY";
                                    } else if (item.type == "bcny") {
                                        item.num = app.sliceNum(item.num, 2);
                                    } else {
                                        item.num = app.sliceNum(item.num, 8);
                                    }
                                });
                                console.log("个人转账新返回：" + JSON.stringify(list));

                                // 渲染模板
                                var temp = doT.template($("#transferCoin").text());
                                // app.log("list", temp(ret.list));
                                if (isdown) {
                                    $("#ul_list").html(temp(list));
                                } else {
                                    $("#ul_list").append(temp(list));
                                }
                                // 判断是不是第一页且没有数据的特殊情况
                                if (list.length == 0 && curPage == 1) {
                                    $("#listState").text("暂时没有相关数据");
                                }
                                if (curPage == totalPage && totalPage != 0) {
                                    $("#listState").text("已经到底了");
                                }
                            }
                        }
                    },
                    extra: {
                        container: "#ul_list",
                        isflower: true
                    }
                });
            }
            //系统转币
            function serviceTransferCoin(page, isdown) {
                app.ajax({
                    param: {
                        method: "post",
                        url: app.ajaxUrl + "finance/system-transfer-coin-lists",
                        data: {
                            values: {
                                token: account.token,
                                page: page
                            }
                        },
                        callback: function (ret, err) {
                            // console.log("个人转账新返回：" + JSON.stringify(ret) );
                            app.stopRefresh();
                            if (ret.code == 200) {
                                totalPage = ret.data.total_page;
                                var list = ret.data.list;
                                list.map(function (item) {
                                    if (item.currency_name == "BHP") {
                                        item.num = app.sliceNum(item.num, 4);
                                    } else if (item.currency_name == "BCNY") {
                                        item.num = app.sliceNum(item.num, 2);
                                    } else {
                                        item.num = app.sliceNum(item.num, 8);
                                        if (item.currency_name == "BTC_TC" || item.currency_name == "IPFS_TC") {
                                            item.currency_name = "CNY";
                                        }
                                    }
                                })
                                // 渲染模板
                                var temp = doT.template($("#serviceTransferCoin").text());
                                // app.log("list", temp(ret.list));
                                if (isdown) {
                                    $("#ul_list").html(temp(list));
                                } else {
                                    $("#ul_list").append(temp(list));
                                }
                                // 判断是不是第一页且没有数据的特殊情况
                                if (list.length == 0 && curPage == 1) {
                                    $("#listState").text("暂时没有相关数据");
                                }
                                if (curPage == totalPage && totalPage != 0) {
                                    $("#listState").text("已经到底了");
                                }
                            }
                        }
                    },
                    extra: {
                        container: "#ul_list",
                        isflower: true
                    }
                });
            }
            function serviceTransferMoney(page, isdown) {
                app.ajax({
                    param: {
                        method: "post",
                        url: app.ajaxUrl + "finance/system-transfer-lists",
                        data: {
                            values: {
                                token: account.token,
                                page: page
                            }
                        },
                        callback: function (ret, err) {
                            // console.log(  "个人转账新返回：" + JSON.stringify(ret)  );
                            app.stopRefresh();
                            if (ret.code == 200) {
                                totalPage = ret.data.total_page;
                                var list = ret.data.list;
                                var reTwo = /([0-9]+\.[0-9]{2})[0-9]*/;
                                // 渲染模板
                                var temp = doT.template($("#serviceTransferMoney").text());
                                // app.log("list", temp(ret.list));
                                if (isdown) {
                                    $("#ul_list").html(temp(list));
                                } else {
                                    $("#ul_list").append(temp(list));
                                }
                                // 判断是不是第一页且没有数据的特殊情况
                                if (list.length == 0 && curPage == 1) {
                                    $("#listState").text("暂时没有相关数据");
                                }
                                if (curPage == totalPage && totalPage != 0) {
                                    $("#listState").text("已经到底了");
                                }
                            }
                        }
                    },
                    extra: {
                        container: "#ul_list",
                        isflower: true
                    }
                });
            }
            // BNCY兑换记录
            function getsellist(curPage, isdown) {
                app.ajax({
                    param: {
                        method: "post",
                        url: app.ajaxUrl + "wallet/userBcnyList",
                        data: {
                            values: {
                                token: account.token,
                                trade_type: "",
                                page: curPage
                            }
                        },
                        callback: function (ret, err) {
                            console.log("获取列表返回：" + JSON.stringify(ret));
                            app.stopRefresh();
                            if (ret.code == 1) {
                                totalPage = ret.total_page;
                                // 渲染模板
                                var temp = doT.template($("#indentSellScuess").text());
                                if (isdown) {
                                    $("#ul_list").html(temp(ret.list));
                                } else {
                                    $("#ul_list").append(temp(ret.list));
                                }
                                if (curPage == 1 && ret.list.length == 0) {
                                    $("#listState").text("暂时没有相关数据");
                                }
                            } else {
                                app.toast(ret.message);
                            }
                        }
                    },
                    extra: {
                        isflower: true,
                        delay: 200
                    }
                });
            }
            //委托代购委托代售记录
            function getListshow(curPage, chooseType, isdown) {
                app.ajax({
                    param: {
                        method: "post",
                        url: app.ajaxUrl + "wallet/entrustTradingList",
                        data: {
                            values: {
                                token: account.token,
                                page: curPage,
                                trade_type: chooseType,
                                currency_name: "",
                                sort: "desc",
                                trade_status: "30,0"
                            }
                        },
                        callback: function (ret, err) {
                            app.log("委托列表记录", "获取列表返回：" + JSON.stringify(ret));
                            app.stopRefresh();
                            if (ret.code == 1) {
                                totalPage = ret.total_page;
                                ret.list.map(function (item) {
                                    if (item.currency_name == "BHP") {
                                        item.num = app.sliceNum(item.num, 4);
                                        item.ex_num = app.sliceNum(item.ex_num, 4);
                                    }
                                })
                                // 渲染模板
                                var temp = doT.template($("#agentSelland").text());
                                if (isdown) {
                                    $("#ul_list").html(temp(ret.list));
                                } else {
                                    $("#ul_list").append(temp(ret.list));
                                }
                                if (curPage == 1 && ret.list.length == 0) {
                                    $("#listState").text("暂时没有相关数据");
                                }
                                if (curPage == 1 && totalPage == 1) {
                                    $("#listState").text("没有更多数据了");
                                }
                            } else {
                                app.toast(ret.message);
                            }
                        }
                    },
                    extra: {
                        isflower: true,
                        delay: 200
                    }
                });
            }
            api.addEventListener(
                {
                    name: "chooseType"
                },
                function (ret) {
                    if (ret && ret.value) {
                        choose = ret.value.chooseType;
                        $("body").scrollTop(0);
                        $("#ul_list").empty();
                        curPage = 1;
                        totalPage = 0;
                        if (ret.value.chooseType != "redBagrecord") {
                            $("#showAboutMe").hide();
                            $(".showListAll").css({
                                marginTop: "0"
                            })
                        }
                        if (ret.value.chooseType != "rechage") {
                            $("#showAboutRecharege").hide();
                            $(".showListAll").css({
                                marginTop: "0"
                            })
                        }
                        if (ret.value.chooseType != "rechagecoin") {
                            $("#walletPayBag").hide();
                            $(".showListAll").css({
                                marginTop: "0"
                            })
                        }
                        if (ret.value.chooseType != "agrentSellAndBuyCoin") {
                            $("#showExchangeCoin").hide();
                            $(".showListAll").css({
                                marginTop: "0"
                            })
                        }
                        if (ret.value.chooseType != "outmoney") {
                            $("#showAboutGetCash").hide();
                            $(".showListAll").css({
                                marginTop: "0"
                            })
                        }
                        if (ret.value.chooseType != "outcoin") {
                            $("#showOutcoinList").hide();
                            $(".showListAll").css({
                                marginTop: "0"
                            })
                        }
                        if (ret.value.chooseType == "rechage" && getforePageData == "true") {
                            rechageType = "myRechareBlance";
                            $("#showAboutRecharege > span").css("color", "#333333");
                            $("#showAboutRecharege > span:first-of-type").css("color", "#ffd203")
                            $("#showAboutRecharege").css("display", "flex");
                            $("#showAboutRecharege").css("display", "-webkit-flex");
                            $("#showAboutRecharege").css("z-index", "300");
                            $(".showListAll").css({
                                marginTop: "1rem"
                            })
                            loadPageT(curPage, true);
                            return
                        }
                        if (ret.value.chooseType == "rechage" && getforePageData == "false") {
                            rechageType = "myRechareBlance";
                            loadPageT(curPage, true);
                            return
                        }
                        if (ret.value.chooseType == "outmoney") {
                            $("#showAboutGetCash").show();
                            $("#showAboutGetCash > span").css("color", "#333333");
                            $("#showAboutGetCash > span:first-of-type").css("color", "#ffd203")
                            $("#showAboutGetCash").css("display", "flex");
                            $("#showAboutGetCash").css("display", "-webkit-flex");
                            $("#showAboutGetCash").css("z-index", "300");
                            $(".showListAll").css({
                                marginTop: "1rem"
                            })
                            loadPage(curPage, true);
                            return
                        }
                        if (ret.value.chooseType == "outcoin") {
                            getOutcoinlist == "otherPayList";
                            $("#showOutcoinList").show();
                            $("#showOutcoinList > span").css("color", "#333333");
                            $("#showOutcoinList > span:first-of-type").css("color", "#ffd203")
                            $("#showOutcoinList").css("display", "flex");
                            $("#showOutcoinList").css("display", "-webkit-flex");
                            $("#showOutcoinList").css("z-index", "300");
                            $(".showListAll").css({
                                marginTop: "1rem"
                            })
                            loadPageOther(curPage, true);
                            return
                        }
                        if (ret.value.chooseType == "agrentSellAndBuyCoin") {
                            $("#showExchangeCoin").show();
                            $("#showExchangeCoin > span").css("color", "#333333");
                            $("#showExchangeCoin > span:first-of-type").css("color", "#ffd203");
                            $("#showExchangeCoin").css("display", "flex");
                            $("#showExchangeCoin").css("display", "-webkit-flex");
                            $("#showExchangeCoin").css("z-index", "300");
                            $(".showListAll").css({
                                marginTop: "1rem"
                            })
                            getListshow(curPage, "sell", true);
                            return
                        }
                        if (ret.value.chooseType == "enstru") {
                            loadPageEstr(curPage, true);
                            return
                        }
                        if (ret.value.chooseType == "buycoin") {
                            getBuyCoinList(curPage, true);
                            return
                        }
                        if (ret.value.chooseType == "exchangesweet") {
                            exchangeBhpcSweet(curPage, true);
                            return
                        }
                        if (ret.value.chooseType == "rechagecoin") {
                            $("#walletPayBag").show();
                            $("#walletPayBag > span").css("color", "#333333");
                            $("#walletPayBag > span:first-of-type").css("color", "#ffd203")
                            $("#walletPayBag").css("display", "flex");
                            $("#walletPayBag").css("display", "-webkit-flex");
                            $("#walletPayBag").css("z-index", "300");
                            $(".showListAll").css({
                                marginTop: "1rem"
                            })
                            rechageCoin(curPage, true);
                            return
                        }
                        if (ret.value.chooseType == "ctocTransferCoin") {
                            transferCoin(curPage, true);
                            return
                        }
                        if (ret.value.chooseType == "serviceTransferCoin") {
                            serviceTransferCoin(curPage, true);
                            return
                        }
                        if (ret.value.chooseType == "bcnyChangeList") {
                            getsellist(curPage, true);
                            return
                        }
                        if (ret.value.chooseType == "serviceTransferMoney") {
                            serviceTransferMoney(curPage, true);
                            return
                        }
                        if (ret.value.chooseType == "redBagrecord") {
                            showfirst = "myReceiveRed";
                            $("#showAboutMe > span").css("color", "#333333");
                            $("#showAboutMe>span:first-of-type").css("color", "#ffd203")
                            redBagList("", true);
                            $("#showAboutMe").css("display", "flex");
                            $("#showAboutMe").css("display", "-webkit-flex");
                            $("#showAboutMe").css("z-index", "300");
                            $(".showListAll").css({
                                marginTop: "1rem"
                            })
                        }
                    }
                }
            );

            //充值记录选择记录
            $("#showAboutRecharege > span").click(function () {
                $("#showAboutRecharege > span").css("color", "#333333");
                $(this).css("color", "#ffd203");
                $("body").scrollTop(0);
                $("#ul_list").empty();
                rechageType = $(this).attr("data-choose");
                if (rechageType == "myRechareBlance") {
                    loadPageT(curPage, true);
                } else {
                    getOtcRechageList(curPage, true);
                }
            });
            //提现记录
            $("#showAboutGetCash > span").click(function () {
                $("#showAboutGetCash > span").css("color", "#333333");
                $(this).css("color", "#ffd203");
                $("body").scrollTop(0);
                $("#ul_list").empty();
                getCashList = $(this).attr("data-choose");
                if (getCashList == "myGetCashBlance") {
                    loadPage(curPage, true);
                } else {
                    loadPageBcny(curPage, true);
                }
            });

            //提币记录
            $("#showOutcoinList > span").click(function () {
                $("#showOutcoinList > span").css("color", "#333333");
                $(this).css("color", "#ffd203");
                $("body").scrollTop(0);
                $("#ul_list").empty();
                getOutcoinlist = $(this).attr("data-choose");
                if (getOutcoinlist == "otherPayList") {
                    loadPageOther(curPage, true);
                } else {
                    bhpayList(curPage, true);
                }
            });
            //委托交易记录
            $("#showExchangeCoin > span").click(function () {
                $("#showExchangeCoin > span").css("color", "#333333");
                $(this).css("color", "#ffd203");
                $("body").scrollTop(0);
                $("#ul_list").empty();
                agentSellChoose = $(this).attr("data-choose");
                if (agentSellChoose == "sell") {
                    getListshow(curPage, "sell", true);
                } else {
                    getListshow(curPage, "buy", true);
                }
            });
            //红包记录选择记录
            $("#showAboutMe > span").click(function () {
                $("#showAboutMe > span").css("color", "#333333");
                $(this).css("color", "#ffd203");
                $("body").scrollTop(0);
                $("#ul_list").empty();
                showfirst = $(this).attr("data-choose");
                if (showfirst == "myReceiveRed") {
                    redBagList("", true);
                } else {
                    sendRedBagList("", true);
                }
            });

            //充币记录选择记录
            $("#walletPayBag > span").click(function () {
                $("#walletPayBag > span").css("color", "#333333");
                $(this).css("color", "#ffd203");
                $("body").scrollTop(0);
                $("#ul_list").empty();
                rechargeCoin = $(this).attr("data-choose");
                if (rechargeCoin == "otherwalletPay") {
                    rechageCoin(curPage, true);
                } else {
                    rechageCoinBhpay(curPage, true);
                }
            });

            // 设置可以下拉加载
            app.downRefresh(function () {
                app.log("rent监听下拉刷新", "curPage：" + curPage + " totalPage：" + totalPage + "当前选择" + choose);
                $("#ul_list").empty();
                curPage = 1;
                totalPage = 0;
                if (choose == "rechage" && rechageType == "myRechareBlance") {
                    loadPageT(curPage, true);
                    return
                }
                if (choose == "rechage" && rechageType == "myRechareOtc") {
                    getOtcRechageList(curPage, true);
                    return
                }
                if (choose == "outmoney" && getCashList == "myGetCashBlance") {
                    loadPage(curPage, true);
                    return
                }
                if (choose == "outmoney" && getCashList == "myGetCashBcny") {
                    loadPageBcny(curPage, true);
                    return
                }
                if (choose == "outcoin" && getOutcoinlist == "otherPayList") {
                    loadPageOther(curPage, true);
                    return
                }
                if (choose == "outcoin" && getOutcoinlist == "BHPayList") {
                    bhpayList(curPage, true);
                    return
                }
                if (choose == "agrentSellAndBuyCoin" && agentSellChoose == "sell") {
                    getListshow(curPage, "sell", true);
                    return
                }
                if (choose == "agrentSellAndBuyCoin" && agentSellChoose == "buy") {
                    getListshow(curPage, "buy", true);
                    return
                }
                if (choose == "rechagecoin" && rechargeCoin == "otherwalletPay") {
                    rechageCoin(curPage, true);
                    return
                }
                if (choose == "rechagecoin" && rechargeCoin == "bhpayWalletPay") {
                    rechageCoinBhpay(curPage, true);
                    return
                }
                if (choose == "enstru") {
                    loadPageEstr(curPage, true);
                    return
                }
                if (choose == "buycoin") {
                    getBuyCoinList(curPage, true);
                    return
                }
                if (choose == "exchangesweet") {
                    exchangeBhpcSweet(curPage, true);
                    return
                }
                if (choose == "ctocTransferCoin") {
                    transferCoin(curPage, true);
                    return
                }
                if (choose == "serviceTransferCoin") {
                    serviceTransferCoin(curPage, true);
                    return
                }
                if (choose == "serviceTransferMoney") {
                    serviceTransferMoney(curPage, true);
                    return
                }
                if (choose == "bcnyChangeList") {
                    getsellist(curPage, true);
                    return
                }
                if (choose == "redBagrecord" && showfirst == "myReceiveRed") {
                    redBagList("", true);
                    return
                }
                if (choose == "redBagrecord" && showfirst == "mySendRed") {
                    sendRedBagList("", true);
                }
            });
            // 监听滚动到底部
            app.toBottom(function () {
                app.log("rent监听到了滚动到底部", "curPage：" + curPage + " totalPage：" + totalPage + "当前选择" + choose);
                if (choose == "rechage" && rechageType == "myRechareBlance") {
                    if (curPage < totalPage) {
                        curPage++;
                        loadPageT(curPage, false);
                    }
                    return
                }
                if (choose == "rechage" && rechageType == "myRechareOtc") {
                    if (curPage < totalPage) {
                        curPage++;
                        getOtcRechageList(curPage, false);
                    }
                    return
                }
                if (choose == "outmoney" && getCashList == "myGetCashBlance") {
                    if (curPage < totalPage) {
                        curPage++;
                        loadPage(curPage, false);
                    }
                    return
                }
                if (choose == "outmoney" && getCashList == "myGetCashBcny") {
                    if (curPage < totalPage) {
                        curPage++;
                        loadPageBcny(curPage, false)
                    }
                    return
                }
                if (choose == "outcoin" && getOutcoinlist == "otherPayList") {
                    if (curPage < totalPage) {
                        curPage++;
                        loadPageOther(curPage, false);
                    }
                    return
                }
                if (choose == "outcoin" && getOutcoinlist == "BHPayList") {
                    if (curPage < totalPage) {
                        curPage++;
                        bhpayList(curPage, false);
                    }
                    return
                }
                if (choose == "agrentSellAndBuyCoin" && agentSellChoose == "sell") {
                    if (curPage < totalPage) {
                        curPage++;
                        getListshow(curPage, "sell", false);
                    }
                    return
                }
                if (choose == "agrentSellAndBuyCoin" && agentSellChoose == "buy") {
                    if (curPage < totalPage) {
                        curPage++;
                        getListshow(curPage, "buy", false);
                    }
                    return
                }
                if (choose == "rechagecoin" && rechargeCoin == "otherwalletPay") {
                    if (curPage < totalPage) {
                        curPage++;
                        rechageCoin(curPage, false);
                    }
                    return
                }
                if (choose == "rechagecoin" && rechargeCoin == "bhpayWalletPay") {
                    if (curPage < totalPage) {
                        curPage++;
                        rechageCoinBhpay(curPage, false);
                    }
                    return
                }
                if (choose == "enstru") {
                    if (curPage < totalPage) {
                        curPage++;
                        loadPageEstr(curPage, false);
                    }
                    return
                }
                if (choose == "buycoin") {
                    if (curPage < totalPage) {
                        curPage++;
                        getBuyCoinList(curPage, false);
                    }
                    return
                }
                if (choose == "exchangesweet") {
                    if (curPage < totalPage) {
                        curPage++;
                        exchangeBhpcSweet(curPage, false);
                    }
                    return
                }
                if (choose == "rechagecoin") {
                    if (curPage < totalPage) {
                        curPage++;
                        rechageCoin(curPage, false);
                    }
                    return
                }
                if (choose == "ctocTransferCoin") {
                    if (curPage < totalPage) {
                        curPage++;
                        transferCoin(curPage, false);
                    }
                    return
                }
                if (choose == "serviceTransferCoin") {
                    if (curPage < totalPage) {
                        curPage++;
                        serviceTransferCoin(curPage, false);
                    }
                    return
                }
                if (choose == "serviceTransferMoney") {
                    if (curPage < totalPage) {
                        curPage++;
                        serviceTransferMoney(curPage, false);
                    }
                    return
                }
                if (choose == "bcnyChangeList") {
                    if (curPage < totalPage) {
                        curPage++;
                        getsellist(curPage, false);
                    }
                    return
                }
                if (choose == "redBagrecord" && showfirst == "myReceiveRed") {
                    redBagList(lastGetReTime, false);
                    return
                }
                if (choose == "redBagrecord" && showfirst == "mySendRed") {
                    sendRedBagList(lastGetSeTime, false);
                }
            });
        };
    </script>
    <script id="listT" type="text/html">
    {{~it:value:index}}
    <li style="display: inline-block;height: 1.6rem;width: 100%;border-bottom: 0.01rem solid #e1e1e1;display:flex;align-items: center;">
        <div style="width: 100%;">
            <p style="display: flex;display: -webkit-flex;justify-content: space-between;-webkit-justify-content: space-between;color: #181818;font-weight: 500;">
                <span>
                    {{=value.add_time}}
                </span>
                <span>
                    {{=value.amount}}
                    {{?value.currency_code=="CNY"}}CNY{{??value.currency_code=="USD"}}USD{{??value.currency_code=="EUR"}}EUR
                    {{??value.currency_code=="HKD"}}HKD{{?}}
                </span>
            </p>
            <p style="display: flex;display: -webkit-flex;justify-content: space-between;-webkit-justify-content: space-between;color: #181818;font-size: 0.24rem;margin-top: 0.1rem;">
                <span style="color: #adadad;">
                    <span>{{?value.currency_code=="CNY"}}CNY{{??value.currency_code=="USD"}}USD{{??value.currency_code=="EUR"}}EUR
                        {{??value.currency_code=="HKD"}}HKD{{?}}提现</span>&nbsp;|&nbsp;{{=value.bankinfo.bank_name}}:
                    <span>
                        {{=value.bankinfo.bank_card_no.slice(0,4)}}******{{=value.bankinfo.bank_card_no.slice(-4)}}
                    </span>
                </span>
                <span style="color: #7ED321;">
                    {{?value.status==0}}
                    <span class="style_yes2">审核中</span>
                    {{??value.status==1}}
                    <span class="style_yes">已完成</span>
                    {{??value.status==2}}
                    <span class="style_yes3">已取消</span>
                    {{?}}
                </span>
            </p>
        </div>
    </li>
    {{~}}
    </script>
    <script id="listgetCashBcny" type="text/html">
    {{~it:value:index}}
    <li style="display: inline-block;height: 1.6rem;width: 100%;border-bottom: 0.01rem solid #e1e1e1;display:flex;align-items: center;">
        <div style="width: 100%;">
            <p style="display: flex;display: -webkit-flex;justify-content: space-between;-webkit-justify-content: space-between;color: #181818;font-weight: 500;">
                <span>
                    {{=value.add_time}}
                </span>
                <span>
                    {{=value.amount}}OTC余额
                </span>
            </p>
            <p style="display: flex;display: -webkit-flex;justify-content: space-between;-webkit-justify-content: space-between;color: #181818;font-size: 0.24rem;margin-top: 0.1rem;">
                <span style="color: #adadad;">
                    <span>余额OTC提现</span>&nbsp;|&nbsp;{{=value.bankinfo.bank_name}}:
                    <span>
                        {{=value.bankinfo.bank_card_no.slice(0,4)}}******{{=value.bankinfo.bank_card_no.slice(-4)}}
                    </span>
                </span>
                <span style="color: #7ED321;">
                    {{?value.status==0}}
                    <span class="style_yes2">{{=value.status_format}}</span>
                    {{??value.status==1}}
                    <span class="style_yes">{{=value.status_format}}</span>
                    {{??value.status==2}}
                    <span class="style_yes">{{=value.status_format}}</span>
                    {{??value.status==-1}}
                    <span class="style_yes3">{{=value.status_format}}</span>
                    {{??value.status==-2}}
                    <span class="style_yes3">{{=value.status_format}}</span>
                    {{?}}
                </span>
            </p>
        </div>
    </li>
    {{~}}
    </script>
    <script id="rechageOtclist" type="text/html">
    {{~it:value:index}}
    <li style="display: inline-block;height: 1.6rem;width: 100%;padding-top: 0.17rem;border-bottom: 0.01rem solid #e1e1e1;display: flex;display: -webkit-flex;align-items: center;">
        <div style="width: 100%;">
            <p style="display: flex;display: -webkit-flex;justify-content: space-between;-webkit-justify-content: space-between;color: #181818;font-weight: 500;">
                <span>
                    {{=value.time_create}}
                </span>
                <span>
                    {{=value.amount}}{{=value.currency_name}}
                </span>
            </p>
            <p style="display: flex;display: -webkit-flex;justify-content: space-between;-webkit-justify-content: space-between;color: #181818;font-size: 0.24rem;margin-top: 0.1rem;">
                <span style="color: #adadad;">
                    OTC充值
                </span>
                <span style="color: #7ED321;">
                    {{=value.status==0?"审核中":"已支付"}}
                </span>
            </p>
        </div>
    </li>
    {{~}}
    </script>
    <script id="list" type="text/html">
    {{~it:value:index}}
    <li style="display: inline-block;height: 1.6rem;width: 100%;padding-top: 0.17rem;border-bottom: 0.01rem solid #e1e1e1;display: flex;display: -webkit-flex;align-items: center;">
        <div style="width: 100%;">
            <p style="display: flex;display: -webkit-flex;justify-content: space-between;-webkit-justify-content: space-between;color: #181818;font-weight: 500;">
                <span>
                    {{=value.create_time}}
                </span>
                <span>
                    {{=value.amount}}
                    {{?value.currency_code=="cny"}}CNY{{??value.currency_code=="usd"}}USD{{??value.currency_code=="eur"}}EUR
                    {{??value.currency_code=="hkd"}}HKD{{?}}
                </span>
            </p>
            <p style="display: flex;display: -webkit-flex;justify-content: space-between;-webkit-justify-content: space-between;color: #181818;font-size: 0.24rem;margin-top: 0.1rem;">
                <span style="color: #adadad;">
                    {{=value.channel_name}}
                </span>
                <span style="color: #7ED321;">
                    {{?value.channel=="BANK_TRANSFER"||value.channel=="C2C_TRANSFER"}}
                        {{?value.status=="0"&&value.transfer_ensure=="0"}}待确认转账{{?}}
                        {{?value.status=="0"&&value.transfer_ensure=="1"}}未支付{{?}}
                        {{?value.status=="1"}}已支付{{?}}
                        {{?value.status=="-1"}}已取消{{?}}
                    {{??}}
                        {{?value.status=="-1"}}已取消{{?}}
                        {{?value.status=="0"}}待支付{{?}}
                        {{?value.status=="1"}}已支付{{?}}
                    {{?}}
                </span>
            </p>
        </div>
    </li>
    {{~}}
    </script>
    <script id="outcoinlist" type="text/html">
    {{~it:value:index}}
    <li style="display: inline-block;height: 1.6rem;width: 100%;padding-top: 0.17rem;border-bottom: 0.01rem solid #e1e1e1;display:flex;display: -webkit-flex;align-items: center;-webkit-align-items: center;">
        <div style="width:100%">
            <div class="list-item">
                <span class="coinTime">
                    {{=value.add_time}}
                </span>
                <div class="condition">
                    <span>
                        <span class="coin-list-detail">{{=value.coin_num}}</span>
                    </span>
                </div>
            </div>
            <div class="list-addres">
                <span> {{=value.coin_type}}&nbsp;|&nbsp;{{=value.wallet_address}}</span>
                <div>
                    {{?value.state==0}}
                    <div class="aui-list-item-right style_yes2">审核中</div>
                    {{??value.state==1}}
                    <div class="aui-list-item-right style_yes">已完成</div>
                    {{??value.state==2}}
                    <div class="aui-list-item-right style_yes3">已取消</div>
                    {{?}}
                </div>
            </div>
            {{?value.remark}}
                <div class="list-addres" style="margin-bottom:0.2rem;">
                    {{=value.remark}}
                </div>
            {{?}}
        </div>
    </li>
    {{~}}
    </script>
    <script id="bhpayOutList" type="text/html">
    {{~it:value:index}}
    <li style="display: inline-block;height: 1.6rem;width: 100%;padding-top: 0.17rem;border-bottom: 0.01rem solid #e1e1e1;display:flex;display: -webkit-flex;align-items: center;-webkit-align-items: center;">
        <div style="width:100%">
            <div class="list-item">
                <span class="coinTime">
                    {{=value.create_time}}
                </span>
                <div class="condition">
                    <span>
                        <span class="coin-list-detail">{{=value.num}}</span>
                    </span>
                </div>
            </div>
            <div class="list-addres">
                <span> {{=value.currency_name}}&nbsp;|&nbsp;BHPay账户(尾号{{=value.bhpay_card_no.slice(-4)}})</span>
                <div>
                    {{?value.status==1}}
                    <div class="aui-list-item-right style_yes2">审核中</div>
                    {{??value.status==2}}
                    <div class="aui-list-item-right style_yes">已通过</div>
                    {{??value.status==3}}
                    <div class="aui-list-item-right style_yes3">已撤销</div>
                    {{??value.status==4}}
                    <div class="aui-list-item-right style_yes3">已驳回</div>
                    {{??value.status==5}}
                    <div class="aui-list-item-right style_yes">已到账</div>
                    {{??value.status==6}}
                    <div class="aui-list-item-right style_yes3">失败</div>
                    {{?}}
                </div>
            </div>
        </div>
    </li>
    {{~}}
    </script>
    <script id="bhpcsweet" type="text/html">
    {{~it:value:index}}
    <li style="display: inline-block;height: 1.6rem;width: 100%;border-bottom: 0.01rem solid #e1e1e1;display:flex;align-items: center;">
        <div style="width: 100%;">
            <p style="display: flex;display: -webkit-flex;justify-content: space-between;-webkit-justify-content: space-between;color: #181818;font-weight: 500;">
                <span>
                    {{=value.create_time}}
                </span>
                <span>
                    {{=value.bhpc_num}}BHP
                </span>
            </p>
            <p style="display: flex;display: -webkit-flex;justify-content: space-between;-webkit-justify-content: space-between;color: #181818;font-size: 0.24rem;margin-top: 0.1rem;">
                <span style="color: #adadad;">
                    <span>兑换数量：{{=value.sweet_num}}</span>
                </span>
                <span style="color: #7ED321;">
                    兑换成功
                </span>
            </p>
        </div>
    </li>
    {{~}}
    </script>
    <script id="rechageCoin" type="text/html">
    {{~it:value:index}}
    <li style="display: inline-block;height: 1.6rem;width: 100%;border-bottom: 0.01rem solid #e1e1e1;display:flex;align-items: center;">
        <div style="width: 100%;">
            <p style="display: flex;display: -webkit-flex;justify-content: space-between;-webkit-justify-content: space-between;color: #181818;font-weight: 500;">
                <span>
                    {{=value.add_time}}
                </span>
                <span>
                    {{=value.num}} {{=value.currency_name}}
                </span>
            </p>
            <p style="display: flex;display: -webkit-flex;justify-content: space-between;-webkit-justify-content: space-between;color: #181818;font-size: 0.24rem;margin-top: 0.1rem;">
                <span style="color: #adadad;">
                    <span>充币地址：{{=value.to_address.slice(0,8)+"……"+value.to_address.slice(-8)}}</span>
                </span>
                <span style="color: #7ED321;">
                    {{?value.status==0}}
                    <span class="style_yes2">审核中</span>
                    {{??value.status==1}}
                    <span class="style_yes">充币成功</span>
                    {{??value.status==-1}}
                    <span class="style_yes3">充币失败</span>
                    {{?}}
                </span>
            </p>
        </div>
    </li>
    {{~}}
    </script>
    <script id="rechageCoinBhpay" type="text/html">
        {{~it:value:index}}
        <li style="display: inline-block;height: 1.6rem;width: 100%;border-bottom: 0.01rem solid #e1e1e1;display:flex;align-items: center;">
            <div style="width: 100%;">
                <p style="display: flex;display: -webkit-flex;justify-content: space-between;-webkit-justify-content: space-between;color: #181818;font-weight: 500;">
                    <span>
                        {{=value.create_at}}
                    </span>
                    <span>
                        {{=value.amount}}
                    </span>
                </p>
                <p style="display: flex;display: -webkit-flex;justify-content: space-between;-webkit-justify-content: space-between;color: #181818;font-size: 0.24rem;margin-top: 0.1rem;">
                    <span style="color: #adadad;">
                        <span>{{=value.currency}} | {{=value.card_num}}</span>
                    </span>
                    <span style="color: #7ED321;">
                        <span class="style_yes">{{=value.state}}</span>
                    </span>
                </p>
            </div>
        </li>
        {{~}}
        </script>
    <script id="redBagListRe" type="text/html">
    {{~it:value:index}}
    <li style="display: inline-block;height: 1.6rem;width: 100%;padding-top: 0.17rem;border-bottom: 0.01rem solid #e1e1e1;display:flex;display: -webkit-flex;align-items: center;-webkit-align-items: center;">
        <div style="width:100%">
            <div class="list-item">
                <span class="coinTime">
                    {{=value.opened_at_format}}
                </span>
                <div class="condition">
                    <span>
                        <span class="coin-list-detail">+{{=value.amount}} {{=value.currency}}</span>
                    </span>
                </div>
            </div>
            <div class="list-addres">
                <span> {{=value.is_refund==true?"红包退回":"收到红包"}}&nbsp;|&nbsp;{{=value.telphone}}</span>
                <div style="width:0.3rem;height:0.3rem">

                </div>
            </div>
        </div>
    </li>
    {{~}}
    </script>
    <script id="sendRedBagList" type="text/html">
    {{~it:value:index}}
    <li style="display: inline-block;height: 1rem;width: 100%;padding-top: 0.17rem;border-bottom: 0.01rem solid #e1e1e1;display:flex;display: -webkit-flex;align-items: center;-webkit-align-items: center;">
        <div style="width:100%;display:flex;display:-webkit-flex;justify-content:space-between;align-items:center;">
            <div>
                {{=value.created_at_format}}
            </div>
            <div>
                {{=value.amount}} {{=value.currency}}
            </div>
        </div>
    </li>
    {{~}}
    </script>
    <script id="transferCoin" type="text/html">
    {{~it:value:index}}
    <li style="display: inline-block;height: 1.6rem;width: 100%;border-bottom: 0.01rem solid #e1e1e1;display:flex;align-items: center;">
        <div style="width: 100%;">
            <p style="display: flex;display: -webkit-flex;justify-content: space-between;-webkit-justify-content: space-between;color: #181818;font-weight: 500;">
                <span>
                    {{=value.addtime}}
                </span>
                <span>
                    {{=value.num}} {{=value.name}}
                </span>
            </p>
            <p style="display: flex;display: -webkit-flex;justify-content: space-between;-webkit-justify-content: space-between;color: #181818;font-size: 0.24rem;margin-top: 0.1rem;">
                <span style="color: #adadad;">
                    <span>
                        对方账号: ({{=value.tel}})
                        <span style="color: {{=value.status=='out'? 'red':'#7ED321'}};">（{{=value.status=="out"?"转出":"转入"}}）</span>
                    </span>
                </span>
                <span style="color: #7ED321;">

                </span>
            </p>
        </div>
    </li>
    {{~}}
    </script>
    <script id="serviceTransferCoin" type="text/html">
    {{~it:value:index}}
    <li style="display: inline-block;height: 1.6rem;width: 100%;border-bottom: 0.01rem solid #e1e1e1;display:flex;align-items: center;">
        <div style="width: 100%;">
            <p style="display: flex;display: -webkit-flex;justify-content: space-between;-webkit-justify-content: space-between;color: #181818;font-weight: 500;">
                <span>
                    {{=value.add_time}}
                </span>
                <span>
                   <span>
                    {{=value.type==1?"+":"-"}} {{=value.num}} {{=value.currency_name}}
                   </span> 
                   <!-- <span style="color:#F15342;">
                        抵扣电费
                   </span> -->
                </span>
            </p>
        </div>
    </li>
    {{~}}
    </script>
    <script id="serviceTransferMoney" type="text/html">
    {{~it:value:index}}
    <li style="display: inline-block;height: 1.6rem;width: 100%;border-bottom: 0.01rem solid #e1e1e1;display:flex;align-items: center;">
        <div style="width: 100%;">
            <p style="display: flex;display: -webkit-flex;justify-content: space-between;-webkit-justify-content: space-between;color: #181818;font-weight: 500;">
                <span>
                    {{=value.add_time}}
                </span>
                <span>
                    {{=value.type==1?"+":"-"}} {{=value.add_money}} {{=value.currency_code}}
                </span>
            </p>
        </div>
    </li>
    {{~}}
    </script>
    <script id="indentSellScuess" type="text/html">
    {{~it:value:index}}
    <li style="display: inline-block;height: 1.6rem;width: 100%;border-bottom: 0.01rem solid #e1e1e1;display:flex;align-items: center;padding-top:0.15rem;">
        <div style="width: 100%;">
            <p style="display: flex;display: -webkit-flex;justify-content: space-between;-webkit-justify-content: space-between;color: #181818;font-weight: 500;">
                <span style="display: flex;display: -webkit-flex;color: #181818;align-items: center;">
                    <span style="color:{{=value.trade_type=='buy'?'#7ed321':'#ff6678'}};background-color:{{=value.trade_type=='buy'?'#e0f4d2':'#ffe4e6'}};font-size: 0.22rem;text-align: center;border-radius: 0.05rem;margin-right:0.1rem;padding:0 0.1rem;">
                        {{=value.trade_type=="buy"?"兑入BCNY":"兑出BCNY"}}
                    </span>
                    {{=value.trade_time}}
                </span>
                <span>
                    {{?value.currency_code=="cny"}}￥{{??value.currency_code=="usd"}}${{??value.currency_code=="eur"}}€
                    {{??value.currency_code=="hkd"}}HK${{??}}-{{?}}{{=value.legal_num}}

                </span>
            </p>
            <p style="display: flex;display: -webkit-flex;justify-content: space-between;-webkit-justify-content: space-between;color: #181818;font-size: 0.24rem;margin-top: 0.1rem;">
                <span style="color: #adadad;">
                    <span style="margin-left: 0.12rem;">
                        {{=value.trade_type=="buy"?"兑入数量":"兑出数量"}}：{{=value.bcny_num}} BCNY
                    </span>
                </span>
                <span style="color: #adadad;">
                    成功
                </span>
            </p>
        </div>
    </li>
    {{~}}
    </script>
    <script id="agentSelland" type="text/html">
    {{~it:value:index}}
    <li>
        <div class="backchoose">
            <p>
                <span style="color:{{=value.trade_type=='buy'? '#ff6678':'#7ed321' }};background-color:{{=value.trade_type=="buy"? "#ffe4e6":"#e0f4d2" }};display: inline-block;height: 0.36rem;width:1.1rem;font-size: 0.24rem;text-align: center;line-height: 0.36rem;border-radius: 0.05rem;">
                    {{=value.trade_type=="buy"? "委托代购":"委托代售" }}
                </span>
                <span style="color:#b7b09d;font-size: 0.24rem">
                    {{=value.currency_name}}
                </span>
            </p>
            <span style="color:#b5b5b5;font-size: 0.25rem;display:inline-block;width:1.2rem;">
                {{?value.trade_status==0}}
                已取消
                {{??value.trade_status==10}}
                新建
                {{??value.trade_status==20}}
                部分成交
                {{??value.trade_status==30}}
                全部成交
                {{?}}
            </span>
        </div>
        <div class="priceDetail">
            <div>
                <p>
                    成交价格(BCNY)：<span style="color:{{=value.trade_type=='buy'? '#ff6678':'#7ed321' }};">
                        {{=value.unit_price}}
                    </span>
                </p>
                <p>
                    成交金额(BCNY)：<span style="color:#dedad3;">
                        {{=value.user_amount}}
                    </span>
                </p>
                <p style="color:#dedad3">
                    委托时间：<span>
                        {{=value.create_time}}
                    </span>
                </p>
            </div>
            <div style="flex:1;padding-left:0.2rem;">
                <p>
                    委托数量：<span style="color:#4f4d46;">
                        {{=value.num}}
                    </span>
                </p>
                <p>
                    成交数量：<span style="color:#4f4d46;">
                        {{=value.ex_num}}
                    </span>
                </p>
            </div>
        </div>
    </li>
    {{~}}
    </script>
</body>

</html>